package by.myteam.gonki.gui.view;

import java.awt.Color;
import java.awt.Graphics;

import javax.swing.JPanel;

import by.myteam.gonki.bo.IDrawable;
import by.myteam.gonki.bo.enemy.Enemy;
import by.myteam.gonki.bo.enemy.EnemyFactory;
import by.myteam.gonki.util.ListObjects;

@SuppressWarnings("serial")
public class PlayView extends JPanel {

	public void paint(Graphics g){
		g.setColor(Color.BLACK);
		g.fillRect(0, 0, this.getWidth(), this.getHeight());
		for(IDrawable id : ListObjects.INSTANCE.getListObjects()){
			id.draw(g);
		}
		for(Enemy e : EnemyFactory.INSTANCE.getListEnemy()){
			e.draw(g);
		}
	}
}
